package com.zmc.common.constant;

/**
 * 缓存的key 常量
 * @author zmc
 */
public class CacheConstants {
    /**
     * 登录用户 redis key
     */
    public static final String LOGIN_TOKEN_KEY = "login_tokens:";

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 参数管理 cache key
     */
    public static final String SYS_CONFIG_KEY = "sys_config:";

    /**
     * 字典管理 cache key
     */
    public static final String SYS_DICT_KEY = "sys_dict:";


    /**
     * 首页类目查询key
     */
    public static final String HOME_CATEGORY_KEY = "home:category";

    /**
     * 首页类目锁
     */
    public static final String HOME_CATEGORY_KEY_LOCK = "home:category:lock";


    /**
     * 首页轮播图查询key
     */
    public static final String HOME_BANNER_KEY = "home:banner";

    /**
     * 首页轮播图锁
     */
    public static final String HOME_BANNER_KEY_LOCK = "home:banner:lock";

    /**
     * 省市区查询key
     */
    public static final String AREA_ADDRESS_KEY = "area:address:";

    /**
     * 省市区锁
     */
    public static final String AREA_ADDRESS_LOCK = "area:address:lock";

    /**
     * 购物车key前缀
     */
    public static final String SHOPPING_CART_KEY = "shopping:cart:";

    /**
     * 我的收藏key前缀
     */
    public static final String COLLECTION_KEY = "collection:";

    /**
     * 发送短信key前缀
     */
    public static final String SMS_CODE_MEMBER_KEY = "sms:member:";

    /**
     * 锁持续时间
     * */
    public static final Long LOCK_KEY_EXPIRE_TIME = 30L;

    //锁续期时间
    public static final Long LOCK_RENEWAL_TIME = 30L;

    public static final String COUPON_HISTORY_EXPIRE_PREFIX = "lock:coupon:history:";


}
